dmdscript with fastcgi
Published 2007-07-13 18:25:37
I've been slowly ticking away adding features to the gtk javascript bindings, in doing so, I'm adding extra libraries - Mysql works quite well, and Seeing the recent post on planet.dprogramming.com about fastcgi4d, I wondered if I could run dmdscript from fastcgi.
To enable a web version of dmdscript with my bindings, I had to do quite a bit of re-organization, enabling it to be built with random libraries added in and exclude the Gtk stuff. Core to this was to move all the registration code into the directories that hold the binding code. Each binding directory now contains 3 files, binding***.d, binding***type.d and register***.d. Which manage the dynamic loading of .so (or .dll if windows actually works). and the registering of all the javascript objects and methods.
For fastcgi, I had a look at the code described on the blog post, but was very reluctant to use it, as it
The core files libraries that are helpers in dealing with fastcgi are here.
http://www.akbkhome.com/svn/gtkDS/src/fastcgi/
They need the loader.d and paths.d file from here
http://www.akbkhome.com/svn/gtkDS/wrap/
to be usable.
and the current, non-threaded simple responder is here
http://www.akbkhome.com/svn/gtkDS/src/fcgi.d
So for hello world example, this simple piece of code dumps all the server variables and says hello world.
To enable a web version of dmdscript with my bindings, I had to do quite a bit of re-organization, enabling it to be built with random libraries added in and exclude the Gtk stuff. Core to this was to move all the registration code into the directories that hold the binding code. Each binding directory now contains 3 files, binding***.d, binding***type.d and register***.d. Which manage the dynamic loading of .so (or .dll if windows actually works). and the registering of all the javascript objects and methods.
For fastcgi, I had a look at the code described on the blog post, but was very reluctant to use it, as it
- required tango, which is not a current requirement, and I'm a little concerned about using.
- required knowlege of templates, which are still a bit of a black art. and I've only used very sparingly when absolutly every other alternative has been ruled out.
The core files libraries that are helpers in dealing with fastcgi are here.
http://www.akbkhome.com/svn/gtkDS/src/fastcgi/
They need the loader.d and paths.d file from here
http://www.akbkhome.com/svn/gtkDS/wrap/
to be usable.
and the current, non-threaded simple responder is here
http://www.akbkhome.com/svn/gtkDS/src/fcgi.d
So for hello world example, this simple piece of code dumps all the server variables and says hello world.
println(Request.toSource());Next job is to look at how GET/POST data is passed around and how to escape data on output. among a list of 100 ideas for how it could all work.
println("hellow world from javascript");
dmd
Mentioned By:
google.com : april (90 referals)
google.com : december (68 referals)
google.com : dmdscript (18 referals)
google.com : dmd fastcgi (10 referals)
www.planet-php.net : Planet PHP (8 referals)
www.phpeye.com : dmdscript with fastcgi - Alan Knowles-- 专业PHP社区|论坛|PHP5|教程|源码|下载|框架|手册|类库|PEAR - Powered by (7 referals)
google.com : DMDScript Tango (6 referals)
google.com : fastcgi javascript (6 referals)
google.com : javascript fastcgi (5 referals)
google.com : FastCGI4D (4 referals)
google.com : fastcgi Dmd (3 referals)
google.com : gtkds (3 referals)
www.loadaveragezero.com : dnews: Web Developer RSS News Feeds [Headlines from Planet PHP: Daily News] - loadaverageZero (2 referals)
www.debian.org.hk : Planet DebianHK | Debian HK (2 referals)
google.com : D fastcgi bindings (2 referals)
google.com : fastcgi4d windows (2 referals)
google.com : gtk javascript bindings (2 referals)
www.scroogle.org : dmd tango - Google Search (1 referals)
google.com : akbkhome dmdscript (1 referals)
google.com : amoxicillin (1 referals)
google.com : april (90 referals)
google.com : december (68 referals)
google.com : dmdscript (18 referals)
google.com : dmd fastcgi (10 referals)
www.planet-php.net : Planet PHP (8 referals)
www.phpeye.com : dmdscript with fastcgi - Alan Knowles-- 专业PHP社区|论坛|PHP5|教程|源码|下载|框架|手册|类库|PEAR - Powered by (7 referals)
google.com : DMDScript Tango (6 referals)
google.com : fastcgi javascript (6 referals)
google.com : javascript fastcgi (5 referals)
google.com : FastCGI4D (4 referals)
google.com : fastcgi Dmd (3 referals)
google.com : gtkds (3 referals)
www.loadaveragezero.com : dnews: Web Developer RSS News Feeds [Headlines from Planet PHP: Daily News] - loadaverageZero (2 referals)
www.debian.org.hk : Planet DebianHK | Debian HK (2 referals)
google.com : D fastcgi bindings (2 referals)
google.com : fastcgi4d windows (2 referals)
google.com : gtk javascript bindings (2 referals)
www.scroogle.org : dmd tango - Google Search (1 referals)
google.com : akbkhome dmdscript (1 referals)
google.com : amoxicillin (1 referals)
Follow us
-
- Some thoughts on the language server and its usefulness in the roobuilder
- Roo Builder for Gtk4 moving forward
- Clustered Web Applications - Mysql and File replication
- GitLive - Branching - Merging
- PDO_DataObject Released
- PDO_DataObject is under way
- Mass email Marketing and anti-spam - some of the how-to..
- Hydra - Recruitment done right
Blog Latest
-
Twitter - @Roojs